package UserView;

import Models.Movie;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: Shreyansh
 * Date: 18/8/13
 * Time: 1:32 PM
 * To change this template use File | Settings | File Templates.
 */
public class MovieList {
    ArrayList<Movie> movieList;
    public MovieList()
    {
        movieList =new ArrayList<Movie>();
        Movie movie=new Movie("The Ultimate Gift",2006,"Michael Sajbel","8");
        movieList.add(movie);
        movie=new Movie("Green Street Hooligans",2004,"Lexi Alexander","7");
        movieList.add(movie);
        movie=new Movie("The Avengers",2012,"Joss Whedon","9");
        movieList.add(movie);
        movie=new Movie("Chennai Express",2013,"Rohit Shetty","9");
        movieList.add(movie);
        movie=new Movie("A Few Good Men",1992,"Rob Reiner","9");
        movieList.add(movie);
        movie=new Movie("Rain Man",1988,"Barry Levinson","8");
        movieList.add(movie);
        movie=new Movie("Lincoln",2012,"Steven Speilberg","8");
        movieList.add(movie);
        movie=new Movie("The Godfather",1972,"Francis Coppola","9.5");
        movieList.add(movie);
        movie=new Movie("The Dark Knight",2008,"Chrisropher Nolan","9");
        movieList.add(movie);
        movie=new Movie("Inception",2010,"Chrisropher Nolan","8.9");
        movieList.add(movie);
        movie=new Movie("Krish 3",2013,"Rajesh Roshan","n/a");
        movieList.add(movie);
        movie=new Movie("Avengers 2",2013,"Joss Whedon","n/a");
        movieList.add(movie);
        movie=new Movie("Se7en",1995,"David Fincher","8");
        movieList.add(movie);
        movie=new Movie("Silence of the Lamps",1991,"Jonathan Demme","9");
        movieList.add(movie);
        movie=new Movie("The Social Network",2010,"David Fincher","8");
        movieList.add(movie);

    }
    public ArrayList<Movie> getMovieList() {
        return movieList;
    }
    public void viewMovieList() {
        String heading=String.format("%25s %10s %20s %10s","Name","Year","Director","Rating") ;
        System.out.println(heading);
        for(Movie movie:this.getMovieList())
        {

            movie.DisplayMovieDetails();
        }
    }
}


